package de.fhaugsburg.games.boardgames.test;

import java.util.List;
import java.util.Vector;
import de.fhaugsburg.games.boardgames.scrabble.ScrabbleLetterSack;
import de.fhaugsburg.games.boardgames.scrabble.scrabbleboard.LetterPiece;

public class ScrabbleLetterSackDummy extends ScrabbleLetterSack{ 
	
	private List<LetterPiece> dummyCol = new Vector<LetterPiece>(7);
	private int iCount = 0;
	
	public ScrabbleLetterSackDummy() {
		this.dummyCol.add(LetterPiece.J);
		this.dummyCol.add(LetterPiece.A);
		this.dummyCol.add(LetterPiece.V);
		this.dummyCol.add(LetterPiece.A);
		this.dummyCol.add(LetterPiece.U);
		this.dummyCol.add(LetterPiece.S);
		this.dummyCol.add(LetterPiece.H);
	}
	
	public List<LetterPiece> take( int num ) {
		
		List<LetterPiece> tmpList = new Vector<LetterPiece>(7);
		
		for (int i=0; i<num; i++) {
			tmpList.add(this.take());
		}
		return tmpList;
	}
	
	public LetterPiece take() {
		
		LetterPiece tmp = dummyCol.get(iCount);
		
		if (iCount < 6) {
			iCount++;
		}
		else {
			iCount = 0;
		}
		
		return tmp;
	}
	
	public void reset() {
		this.iCount = 0;
	}
	
	public boolean empty() {
		return false;
	}
	
	public String toString() {
		return "";
	}
 	
}
